package com.app.service.impl;

import com.app.mapper.SysCategoryMapper;
import com.app.model.SysCategory;
import com.app.service.ISysCategoryService;
import com.app.util.FindChildrenUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 公用数据配置	 服务实现类
 * </p>
 *
 * @author yoominic
 * @since 2023-12-05
 */
@Service
public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCategory> implements ISysCategoryService {

    @Override
    public List<SysCategory> getCategoryTree(List<SysCategory> categoryList) {
        return FindChildrenUtil.findCategoryChildren(categoryList, 0);
    }
}
